#coding=utf-8

username = 'liuwei'
password = 'liuwei'
count = 0
while True: # 可以试试用for循环代替while循环进行
    user = raw_input('Please input username: ')
    pw = raw_input('Please input password: ')
    count += 1
    
    if username == user and password == pw:
        print('Welcome login...')
    elif count > 0 and count < 3:
        print('用户名或密码错误!!!')
	    print('Please input again...')
    else:
	    print('Byebye......')
	    break
